home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
- Hewlett Packard LaserJet II Series
- Printer TPU
-
- The Turbo Pascal Unit included in this ZIP file was written to
- facilitate using many of the functions and capabilities of the
- Hewlett Packard laser printer within programs written using Turbo
- Pascal. In addition to using many of the self-contained func-
- tions, this unit also includes functions and fonts from several
- font cartridges. This unit is being released as shareware. If
- you find it useful or would like a copy of the actual source
- code, please register your copy by sending $15.00, along with the
- version number of your copy, to Jim Gibbons, Box 46086, Washing-
- ton DC 20050-6086. I may also be contacted on Compuserve through
- my user ID 72777,1312 or on Delphi with my user ID JEG.
-
- To use this unit in your programs just include HPLII55, HPLII5,
- or HPLII4 in the USES statement of your program.
-
-
-
-
-
-
-
- _________________________________________________________________
- Bar procedure
- _________________________________________________________________
- Function This procedure selects fonts and Bar Code from the
- BAR 3-of-9 Cartridge (HP 92286W1)
-
- Declaration Bar(S : String[2];Style : Typeface)
-
- Remarks S must be '0U' for ASCII, '8U' for Roman-8, or '0E'
- for Roman Extension character set. Style must be
- one of the following enumerated types:
- Gothic9, Gothic14, OCRA, Bar4, Bar8, or
- LineDraw.
-
- Restrictions The Bar 3-of-9 cartridge must be installed in one of
- the printer slots.
-
- See Also Pitch
-
- Example Bar('0U',OCRA);(Use ASCII character set in OCR-A
- Font Style.
-
-
- _________________________________________________________________
- Copies procedure
- _________________________________________________________________
- Function Sets the number of copies to print.
-
- Declaration Copies(Q : byte)
-
- Remarks The value must be a numerical value in the range of
- 1-99.
-
- Example var
- Quantity : Byte;
-
- begin
- Write('Enter the number of copies (1-99) de-
- sired: ');
- Readln(Quantity);
- Copies(Quantity);
- end.
-
- _________________________________________________________________
- CourierPL procedure
- _________________________________________________________________
- Function This procedure is another cartridge specific proce-
- dure for the Courier P&L Cartridge (HP 92286L).
-
- Declaration CourierPL(O : Char;Style : Typeface)
-
- Remarks O must be either '0' for Portrait or '1' for Land-
- scape mode. Style is one of the following enumerat-
- ed types defined in the unit:
- Courier, Bold, Italic, or Line
-
-
-
-
-
-
- Restrictions The Courier PL Cartridge must be installed in one of
- the printer slots for all fonts except Courier which
- may be called without any installed cartridges
- because it is the standard HP LaserJet II font.
- This procedure is used for Courier selection rather
- than any other cartridge procedure when Courier is
- listed as an available font for that cartridge.
-
- Example CourierPL('0',Line);{Use Portrait Line mode}
-
- _________________________________________________________________
- EndGraph procedure
- _________________________________________________________________
- Function This procedure ends the graphics printing routines.
-
- Declaration EndGraph
-
- See Also Raster, StartGraph, Transfer
-
- Example EndGraph:
-
- _________________________________________________________________
- Forms procedure
- _________________________________________________________________
- Function This procedure selects fonts or line drawing from
- either the Forms Portrait or Forms Landscape Car-
- tridges(HP 92286U and HP 92286V).
-
- Declaration Forms(O : Char;Style : TypeFace;S : String[2]);
-
- Remarks O must be either '0' for Portrait or '1' for
- Landscape cartridge. S must be '8U' for Roman-8,
- '0E' for Roman Extension, or '0B' for LineDraw.
- Style must be one of the following enumerated types:
- Bold14, Bold12, Bold10, Bold8, Bold6, Gothic, or
- LineDraw.
-
- Restrictions The appropriate cartridge must be installed in one
- of the printer slots for selection of Portrait or
- Landscape print orientation. When S is set to '0B'-
- LineDraw, then Style must be LineDraw.
-
- See Also Pitch, Present
-
- Example Forms('0',LineDraw,'0B');{Use Portrait Line Drawing}
-
-
-
-
-
-
-
- _________________________________________________________________
- Gray procedure
- _________________________________________________________________
- Function This procedure sets the gray scale or fill pattern.
-
- Declaration Gray(S : String[3]);
-
- Remarks The permitted values of S are as follows:
-
- '10', '15', '30', '45', '70', '90' or '100' to
- represent appropriate percent Gray Scale;
- '1' - Horizontal Line;
- '2' - Vertical Line;
- '3' - Left Diagonal Lines;
- '4' - Right Diagonal Lines;
- '5' - Square Grid;
- '6' - Diagonal Grid;
-
- Example Gray('30'); {Sets 30 percent Gray Scale);
-
- _________________________________________________________________
- HalfLine procedure
- _________________________________________________________________
- Function Sends a half line feed.
-
- Declaration HalfLine
-
- Example Halfline;
-
- _________________________________________________________________
- HPGothic procedure
- _________________________________________________________________
- Function This procedure activates fonts available in the
- Letter Gothic Cartridge (HP 92286E).
-
- Declaration HPGothic(Style : Typeface;S : String[2]);
-
- Remarks S must be '8U' for Roman-8, '0U' for USASCII, or
- '0E' for Roman Extension character sets. Style is
- one of the following enumerated types defined in the
- unit:
- Gothic, Bold, Italic
-
- Restrictions The Gothic Cartridge must be installed in one of the
- slots of the printer for this procedure to have any
- effect.
-
- See Also CourierPL, Pitch, Present
-
- Example HPGothic(Gothic, '8U');{Use Gothic style Roman-8
- characters}
-
-
-
-
-
-
- _________________________________________________________________
- HPPrestige procedure
- _________________________________________________________________
- Function This procedure activates fonts from the Prestige
- Elite Cartridge (HP 92286D).
-
- Declaration HPPrestige(Style : Typeface;S : String[2])
-
- Remarks S must be '8U' for Roman-8, '0U' for USASCII, or
- '0E' for Roman Extension character sets. Style is
- one of the following enumerated types defined in the
- unit:
- Elite, Bold, or Italic
-
- Restrictions The Prestige Cartridge must be installed in one of
- the printer slots.
-
- Example HPPrestige(Elite,'0U');{Use Elite font with USASCII
- character set.
-
- _________________________________________________________________
- Lines procedure
- _________________________________________________________________
- Function Sets the number of printed lines per inch.
-
- Declaration Lines(L : String);
-
- Remarks L can only be one of the following:
-
- '1' - 1 Line per inch;
- '2' - 2 Lines per inch;
- '3' - 3 Lines per inch;
- '4' - 4 Lines per inch;
- '6' - 6 Lines per inch;
- '8' - 8 Lines per inch;
- '0' or '12' - 12 Lines per inch;
- '16 - 16 Lines per inch;
- '24' - 24 Lines per inch;
- '48' - 48 Lines per inch.
-
- Example Lines('8');
-
- _________________________________________________________________
- Margin procedure
- _________________________________________________________________
- Function This procedure will set the Top, Left, and Right
- margins; set page length; and clear all margins
- previously set.
-
- Declaration Margin(M : Char; N : Byte)
-
- Remarks M determines the margin function to be set where:
-
- 'T' = Top Margin and N = # of lines
- 'L' = Left Margin and N = Column #
- 'R' = Right Margin and N = Column #
- 'B' = Text Length and N = # of lines
- 'P' = Page Length and N = # of lines
- 'C' = Clear Margins and N = 0
-
-
-
-
-
-
-
- Examples Margin('L',5); {Set Left Margin to Column 5}
- Margin('R',65); {Set Right Margin to Column 65}
- Margin('C',0); {Clear Margins}
-
-
- _________________________________________________________________
- MI procedure
- _________________________________________________________________
- Function Sets the Horizontal or Vertical Motion Index.
-
- Declaration MI(O : Char;N : Word)
-
- Remarks O must be one of the following with N indicating
- position as shown:
-
- 'H' - Horizontal Motion Index, N = # of 1/120
- inch increments;
- 'C' - Horizontal Column, N = Column #;
- 'I' - Horizontal Dots, N = # of Dots Indent;
- 'P' - Horizontal Decipoints, N = # of Decipoints
- 'V' - Vertical Motion Index, N = # of 1/48 inch
- increments;
- 'R' - Vertical Row, N = Row #;
- 'D' - Vertical Dots, N = # of Dots;
- 'O' - Vertical Decipoints, N = # of Decipoints;
-
- Example MI('P',100); {Indent 1/3 of an inch if resolution is
- 300 dots per inch}
-
- _________________________________________________________________
- Orient procedure
- _________________________________________________________________
- Function Sets print mode to either Portrait or Landscape
- orientation.
-
- Declaration Orient(P : Char)
-
- Remarks Only two valid characters are accepted by the ORIENT
- procedure: '0' sets the print mode orientation to
- Portrait (8.5 X 11) and '1' sets the print mode
- orientation to Landscape (11 X 8.5). This is pri-
- marily used when changing the orientation of the
- current in-use Type Face. NOTE: '0' and '1' repre-
- sent the characters 0 and 1 and not numerical
- values. Throughout this guide, the characters '0'-
- '9' will be shown that way when they denote using
- characters and not numerical values.
-
- Example uses Printer, HPLII5;
-
- var
- M : Char;
-
- begin
- Write('Enter '0' for Portrait or '1' for Land-
- scape: ');
- M := ReadKey;
- Orient(M);
- end.
-
-
-
-
-
-
-
- _________________________________________________________________
- PageSize procedure
- _________________________________________________________________
- Function Sets the size of the paper being used.
-
- Declaration PageSize(Size : Char)
-
- Remarks Size must be one of the following:
-
- 'E' = Executive; 'N' = Letter;
- 'L' = Legal; 'A' = A4;
- 'M' = Monarch; 'C' = Commercial 10;
- 'D' = International DL;
- 'I' = International C5
-
- See Also Margin
-
- Example PageSize('E'); {Set Paper to Executive Size}
- Margin('R',50); {Set Right Margin to Column 50}
-
-
- _________________________________________________________________
- Pitch procedure
- _________________________________________________________________
- Function Set the typeface pitch.
-
- Declaration Pitch(P : Char;N : byte)
-
- Remarks When P = 'H' then N represents Characters Per Inch
- (CPI); when P = 'V' then N represents Points.
-
- Restrictions Active font style must support selected CPI or Point
- size or the procedure will have no effect.
-
- Example Pitch('H',12); {Sets Elite mode}
-
-
- _________________________________________________________________
- Present procedure
- _________________________________________________________________
- Function This procedure activates font styles in the Presen-
- tations 1 Cartridge (HP 92286R).
-
- Declaration Present(O : Char;Style : Typeface; S : String[3]);
-
- Remarks O represents either Portrait '0' or Landscape '1'
- mode. S must be either '0U' for USASCII or '1U' for
- Legal character set. Style is one of the following
- enumerated types defined within the HPLII unit and
- refer directly to the fonts listed in the Presenta-
- tions Cartridge Manual.
- Bold18, Bold16, Bold14, Gothic, PCLine, and
- Linedraw. (NOTE: These are not sting variables
- and must be declared exactly as shown);
- The 18, 16 and 14 with Bold are the point sizes of
- the defined fonts. The S variable is case sensitive
- and must end with an upper case 'U' for this proce-
- dure to function properly.
-
-
-
-
-
-
- Restrictions The Presentations Cartridge must be installed in the
- printer for this procedure to work properly.
-
- See Also Pitch
-
- Example Present('1',Bold16,'0U');{Use 16 Point Bold USASCII
- characters in landscape (11" X 8.5") mode}
-
- _________________________________________________________________
- PrestigePL procedure
- _________________________________________________________________
- Function This procedure activates the font styles in the
- Prestige Elite P&L Cartridge (HP 92286M).
-
- Declaration PrestigePL(O : Char;Style : Typeface)
-
- Remarks O represents either Portrait '0' or Landscape '1'
- mode. Style is one of the following enumerated
- types defined in the unit:
- Elite, Bold, or Italic
-
- Restrictions The Prestige PL Cartridge must be installed in one
- of the slots to use this procedure.
-
- See Also CourierPL, Pitch
-
- Example PrestigePL('0',Italic);{Sets Portrait mode Italic
- printing}
-
- _________________________________________________________________
- Raster procedure
- _________________________________________________________________
- Function This procedures sets the Raster Graphics Resolution.
-
- Declaration Raster(S : String[3])
-
- Remarks S may take the values of '75', '100', '150', or
- '300' to indicate appropriate dots per inch.
-
- See Also StartGraph, Transfer, and EndGraph
-
- Example Raster('150');
-
- ________________________________________________________________
- Reset procedure
- ________________________________________________________________
-
- Function Performs a printer reset and returns all settings to
- their original defaults.
-
- Declaration Reset
-
- Remarks Using this procedure will return all printer set-
- tings to their original power on settings without
- having to actually turn off the printer. If this
- procedure is not called, the printer will retain
- changes made through the use of any of the following
- procedures even after termination of the program
- using them until a RESET is given or the printer is
- turned off and back on.
-
-
-
-
-
-
- _________________________________________________________________
- Rule procedure
- _________________________________________________________________
- Function This procedure sets parameters for line drawing.
-
- Declaration Rule(S : Char; N :Longint)
-
- Remarks When S is set to one of the following characters, N
- represents Dots or Decipoints as indicated:
-
- 'A' Controls Horizontal line Size and N = # of
- Dots.
- 'H' Controls Horizontal line Size and N = # of
- Decipoints.
- 'B' Controls Vertical line Size and N = # of
- Dots.
- 'V' Controls Vertical line Size and N = # of
- Decipoints.
-
- See Also RulePrint, Gray
-
- Example Rule('A',300); {Sets rule length to approximately 1
- inch}
- Rule('B',4); {Sets rule width to 4 dots}
-
- _________________________________________________________________
- RulePrint procedure
- _________________________________________________________________
- Function Prints previously defined rules and sets print
- style.
-
- Declaration RulePrint(S : Char)
-
- Remarks S has three possible values as follows:
-
- '0' - Print Rule
- '2' - Print Gray Scale
- '3' - Print Pattern
-
- See Also Rule, Gray
-
- Restriction When used with Rule, only mode '0' is effective.
-
- Example RulePrint('0');{Print rule set through Rule proce-
- dure}
-
- _________________________________________________________________
- Space procedure
- ________________________________________________________________
- Function Sets character spacing to either fixed spacing or
- proportional spacing.
-
- Declaration Space(Fixed : char)
-
- Remarks Fixed must be either '0' for fixed spacing or '1'
- for proportional spacing.
-
- Restriction Active font must be capable of supporting Propor-
- tional spacing.
-
-
-
-
-
-
-
- See Also Pitch
-
- Example Space('1');
-
- _________________________________________________________________
- StartGraph procedure
- _________________________________________________________________
- Function This procedure sets the starting position of the
- print routine.
-
- Declaration StartGraph(S : string[1])
-
- Remarks When S is '0' the starting print position is the
- Left Graphics Margin and '1' indicates the starting
- print position is the current Cursor Position.
-
- See Also Transfer, EndGraph, Raster
-
- Example StartGraph('0');
-
-
- _________________________________________________________________
- Style procedure
- _________________________________________________________________
- Function Sets the type style to either Upright characters or
- Italics.
-
- Declaration Style(I : Char)
-
- Remarks I can be only '0' for Upright characters or '1' for
- Italics.
-
- Restrictions Active font style must support the style called for
- this procedure to have any effect.
-
- Example Style('1'); {Set print to Italics}
-
-
- _________________________________________________________________
- Transfer procedure
- _________________________________________________________________
- Function This procedure transfers raster graphics to the
- printer.
-
- Declaration Transfer(N : Word)
-
- Remarks N must be set to the Number of rows of raster graph-
- ics to be printed.
-
- See Also Raster, StartGraph, EndGraph
-
- Example Transfer(10);{Transfer 10 rows}
-
-
-
-
-
-
- _________________________________________________________________
- UL procedure
- _________________________________________________________________
- Function Turns underline on and off.
-
- Declaration UL(mode : boolean)
-
- Remarks This procedure is an on or off procedure. Setting
- mode to True turns underline on and False turns it
- off.
-
- Example UL(True);
-
- ________________________________________________________________
- Weight procedure
- ________________________________________________________________
- Function Sets the print weight of individual characters.
-
- Declaration Weight(W : Char)
-
- Remarks 'L' - Light; 'M' - Medium; 'B' - Bold are the only
- valid values for W.
-
- Restrictions Active font style must support more than one weight
- for this procedure to have any effect.
-
- Example Weight('B');
-
- _________________________________________________________________
- Wrap procedure
- _________________________________________________________________
- Function Turns end-of-line text wrap on or off.
-
- Declaration Wrap(W : Boolean)
-
- Remarks Setting W to True turns wrap on and False turns wrap
- off.
-
- Restrictions Turning wrap off will cause any characters extending
- beyond the right margin to be ignored during print-
- ing. Turning wrap on causes characters remaining at
- the end margin setting to be printed on the next
- line without regard to word/syllable length.
-
- See Also Margin
-
- Example Wrap(True);
-
-
-
-
-
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 2,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
-
- Orders only:
- 1-800-2424-PSL
- MC/Visa/AmEx/Discover
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394
-
- PsL also has an outstanding
- catalog for the Macintosh.
-
-